//package com.java.sample.dialog;
//
//import org.springframework.boot.CommandLineRunner;
//import org.springframework.core.annotation.Order;
//
//@Order(Integer.MIN_VALUE) // 确保最先执行
//public class StartupConfirmationRunner implements CommandLineRunner {
//
//    private final StartupConfirmation confirmation;
//
//    public StartupConfirmationRunner(StartupConfirmation confirmation) {
//        this.confirmation = confirmation;
//    }
//
//    @Override
//    public void run(String... args) throws Exception {
//        boolean confirmed = confirmation.confirm(
//                "应用启动确认",
//                "您确定要启动此服务吗?\n\n" +
//                        "服务名称: " + System.getProperty("spring.application.name", "未知") + "\n" +
//                        "运行环境: " + System.getProperty("spring.profiles.active", "default")
//        );
//
//        if (!confirmed) {
//            System.out.println("启动已取消");
//            System.exit(0);
//        }
//
//        System.out.println("启动确认完成，继续启动流程...");
//    }
//}
